package me.siphone.model;

import android.os.Parcel;
import android.os.Parcelable;

public class Measurement implements Parcelable {
    private String type;
    private String time;
    private String level;
    private String unit;
    private String status;

    public Measurement(String type, String time, String level, String unit, String status) {
        this.type = type;
        this.time = time;
        this.level = level;
        this.unit = unit;
        this.status = status;
    }

    protected Measurement(Parcel in) {
        type = in.readString();
        time = in.readString();
        level = in.readString();
        unit = in.readString();
        status = in.readString();
    }

    public static final Creator<Measurement> CREATOR =
            new Creator<Measurement>() {
                @Override
                public Measurement createFromParcel(Parcel in) {
                    return new Measurement(in);
                }

                @Override
                public Measurement[] newArray(int size) {
                    return new Measurement[size];
                }
            };

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(type);
        dest.writeString(time);
        dest.writeString(level);
        dest.writeString(unit);
        dest.writeString(status);
    }
}
